import request from '@/utils/request'

export default {

  // 添加小节
  addVideo(video) {
    return request({
      url: `/eduservice/edu-video/addVideo`,
      method: 'post',
      data: video,
    })
  },
  // 根据id查询小节
  getVideo(videoId) {
    return request({
      url: `/eduservice/edu-video/getVideoInfo/${videoId}`,
      method: 'get',
    })
  },
  // 修改小节
  updataVideo(video) {
    return request({
      url: `/eduservice/edu-video/updataVideo`,
      method: 'post',
      data: video,
    })
  },
  // 删除小节
  removeVideo(videoId) {
    return request({
      url: `/eduservice/edu-video/${videoId}`,
      method: 'delete',
    })
  },
  // 删除阿里云视频
  removeAliyunVideo(videoSourceId) {
    return request({
      url: `/eduvod/video/removeVideo/${videoSourceId}`,
      method: 'delete',
    })
  },
}